/** 
 * @file	msp_string.h
 * @brief	
 * 
 *  This file defined some interfaces about wchar_t string.
 * 
 * @author	hlli
 * @version	1.0
 * @date	2010-05-17
 * 
 * @see		
 * 
 * <b>History:</b><br>
 * <table>
 *  <tr> <th>Version	<th>Date		<th>Author	<th>Notes</tr>
 *  <tr> <td>1.0		<td>2010-05-17	<td>hlli	<td>Create this file</tr>
 * </table>
 * 
 */

#ifndef __MSP_WSTRING_H__
#define __MSP_WSTRING_H__

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef _UNICODE

#define MSP_W2A(wstr, str)	\
{	\
	if ( wstr )	\
	str = msp_wcstombs(wstr);	\
}

#define MSP_A2W(str, wstr)	\
{	\
	if ( str )	\
	wstr = msp_mbstowcs(str);	\
}

size_t msp_wcslen( const wchar_t* wstr );
wchar_t* msp_wcscpy( wchar_t* dest, const wchar_t* src );
int msp_wcscmp( const wchar_t* cs, const wchar_t* ct );
wchar_t* msp_wcscat( wchar_t* dest, const wchar_t* src );

char* msp_wcstombs( const wchar_t* wstr );
wchar_t* msp_mbstowcs( const char* str, size_t str_len );

#endif /* _UNICODE */

#ifdef  __cplusplus
}   /* ... extern "C" */
#endif

#endif	/* __MSP_WSTRING_H__ */
